package com.demo.debugLog;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by wangzhanjin on 2018/6/8.
 * 日志级别特殊的，自定义了
 */
@Controller
@Slf4j
public class debugController {

    @RequestMapping("/debug")
    @ResponseBody
    public String debug() {
        log.error("log日志，级别：error");
        log.warn("log日志，级别：warn");
        log.info("log日志，级别：info");
        log.debug("log日志，级别：debug");
        log.trace("log日志，级别：trace");
        log.info("日志{}，格式{}","参数1","参数2");
        return "黄河之水天上来";
    }
}
